Optimal. Leaf size=141 \[ \frac {1}{2} b d f n \log (x)-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d f n \log \left (1+d f x^2\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2504, 2442, 36,
29, 31, 2423, 2338, 2438} \begin {gather*} -\frac {1}{4} b d f n \text {PolyLog}\left (2,-d f x^2\right )+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {1}{4} b d f n \log \left (d f x^2+1\right )-\frac {b n \log \left (d f x^2+1\right )}{4 x^2}-\frac {1}{2} b d f n \log ^2(x)+\frac {1}{2} b d f n \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 2338
Rule 2423
Rule 2438
Rule 2442
Rule 2504
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-(b n) \int \left (\frac {d f \log (x)}{x}-\frac {\log \left (1+d f x^2\right )}{2 x^3}-\frac {d f \log \left (1+d f x^2\right )}{2 x}\right ) \, dx\\ &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}+\frac {1}{2} (b n) \int \frac {\log \left (1+d f x^2\right )}{x^3} \, dx+\frac {1}{2} (b d f n) \int \frac {\log \left (1+d f x^2\right )}{x} \, dx-(b d f n) \int \frac {\log (x)}{x} \, dx\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b n) \text {Subst}\left (\int \frac {\log (1+d f x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b d f n) \text {Subst}\left (\int \frac {1}{x (1+d f x)} \, dx,x,x^2\right )\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b d f n) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{4} \left (b d^2 f^2 n\right ) \text {Subst}\left (\int \frac {1}{1+d f x} \, dx,x,x^2\right )\\ &=\frac {1}{2} b d f n \log (x)-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d f n \log \left (1+d f x^2\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.07, size = 241, normalized size = 1.71 \begin {gather*} a d f \log (x)+\frac {1}{2} b d f \log (x) \left (n+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right )-\frac {1}{2} a d f \log \left (1+d f x^2\right )-\frac {a \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f \left (n+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )-\frac {b \left (n+2 n \log (x)+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )}{4 x^2}+b d f n \left (\frac {\log ^2(x)}{2}+\frac {1}{2} \left (-\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )-\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )+\frac {1}{2} \left (-\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )-\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.09, size = 619, normalized size = 4.39
method | result | size |
risch | \(-\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}-\frac {f d b n \dilog \left (1-x \sqrt {-d f}\right )}{2}-\frac {a \ln \left (d f \,x^{2}+1\right )}{2 x^{2}}+a d f \ln \left (x \right )-\frac {a d f \ln \left (d f \,x^{2}+1\right )}{2}+\frac {n b \ln \left (x \right ) \ln \left (d f \,x^{2}+1\right ) d f}{2}+\left (-\frac {b \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{2 x^{2}}+b f d \ln \left (x \right )-\frac {b f d \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{2}\right ) \ln \left (x^{n}\right )-\frac {b \ln \left (c \right ) \ln \left (d f \,x^{2}+1\right )}{2 x^{2}}-\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}+\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i f d \ln \left (x \right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}-\frac {f d b n \dilog \left (1+x \sqrt {-d f}\right )}{2}-\frac {f d \ln \left (d f \,x^{2}+1\right ) \ln \left (c \right ) b}{2}+f d \ln \left (x \right ) \ln \left (c \right ) b -\frac {b n \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}+\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}-\frac {f d b n \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )}{2}-\frac {f d b n \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )}{2}+\frac {b d f n \ln \left (x \right )}{2}-\frac {b d f n \ln \left (x \right )^{2}}{2}-\frac {b d f n \ln \left (d f \,x^{2}+1\right )}{4}+\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}\) | \(619\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________